home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / circuits / irsim_ta.z / irsim_ta / irsim / src / ana11 / movetot.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-09-13  |  1.4 KB  |  48 lines

  1. /*
  2.  *     ********************************************************************* 
  3.  *     * Copyright (C) 1988, 1990 Stanford University.                     * 
  4.  *     * Permission to use, copy, modify, and distribute this              * 
  5.  *     * software and its documentation for any purpose and without        * 
  6.  *     * fee is hereby granted, provided that the above copyright          * 
  7.  *     * notice appear in all copies.  Stanford University                 * 
  8.  *     * makes no representations about the suitability of this            * 
  9.  *     * software for any purpose.  It is provided "as is" without         * 
  10.  *     * express or implied warranty.  Export of this software outside     * 
  11.  *     * of the United States of America may require an export license.    * 
  12.  *     *********************************************************************
  13.  */
  14.  
  15. #include "ana.h"
  16. #include "ana_glob.h"
  17.  
  18.  
  19. private void MoveToT( str )
  20.   char  *str;
  21.   {
  22.     TimeType  start;
  23.     double    tmp;
  24.  
  25.     if( str == NULL )
  26.       {
  27.     XBell( display, 0 );
  28.     return;
  29.       }
  30.     tmp = atof( str );
  31.     start = (int) ns2d( tmp );
  32.     if( start < tims.first or start > tims.last or start == tims.start )
  33.     return;
  34.  
  35.     tims.start = start;
  36.     tims.end = start + tims.steps;
  37.     RedrawTimes();
  38.     UpdateScrollBar();
  39.     DrawTraces( start, tims.end );
  40.   }
  41.  
  42.  
  43. public void MoveToTime( s )
  44.    char  *s;                /* the menu string => ignore it */
  45.   {
  46.     Query( "\nEnter Time > ", MoveToT );
  47.   }
  48.